*{margin: 0;padding: 0;}
.a{width:5rem;height:5rem;background: red;position: absolute;top:50%;left:50%;}
.q{width:10rem;height:10rem;background: yellow;position: relative;top:50%;left:50%;}